package com.wiwj.springboot.dubbo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.wiwj.springboot.dubbo.po.City;
import com.wiwj.springboot.dubbo.service.CityService;

@RestController
public class CityController {

	@Autowired
	private CityService cityService;
	
	@RequestMapping("/findCityId/{id}")
	public City findCityId(@PathVariable(value = "id") int id, Model model) {
		City city = cityService.findCityById(id);
		return city;
	}
	
}
